

<template>
	<view>
		<view class="ulist">
			<view class="items" v-for="(item,index) in List" :key="index">
				<image src="../../static/tx.png" mode=""></image>
				<view class="flex_r">
					<view class="flex">
						<view class="t1">提现</view>
						<view class="t2">-{{item.amount}}</view>
					</view>
					<view class="flex">
						<view class="t3">{{item.createTime}}</view>
						<view class="t4" v-if="item.state == 'DRAW.ACCEPTED'">已受理</view>
						<view class="t4" v-else-if="item.state == 'DRAW.PROCESSING'">处理中</view>
						<view class="t4" v-else-if="item.state == 'DRAW.SUCCESS'">成功</view>
						<view class="t4" v-else-if="item.state == 'DRAW.FAILED'">失败</view>
					</view>
				</view>
			</view>
		</view>
		<view class="" style="height: 100rpx;">
			
		</view>
		<view class="kong" v-if="nolist">
			<view class="">
				<image src="/static/kong.png" mode=""></image>
				<view class="ts">
					尚无数据
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		drawApplyList
	} from '@/common/http.api.js';
	export default {
		data() {
			return {
				params:{
					pageNum: 1,
					pageSize: 15,
				},
				List:[],
				nolist:false
			};
		},
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			this.params.pageNum++
			this.getList()
		},
		methods:{
			getList(){
				drawApplyList(this.params).then(res=>{
					console.log(res);
					this.List.push(...res.rows)
					let total = Math.ceil(res.total / this.params.pageSize);
					this.nolist = total == 0
				})
			},
		}
	}
</script>

<style lang="scss">
	.kong {
		width: 100%;
		margin: 230rpx auto;
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;
	
		image {
			width: 228rpx;
			height: 228rpx;
		}
	
		.ts {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 36rpx;
			color: #000000;
			margin-top: 20rpx;
		}
	}

.ulist{
	padding: 0rpx 20rpx;
	box-sizing: border-box;
	.items{
		display: flex;
		align-items: center;
		border-bottom: 1px solid #eee;
		padding-bottom: 20rpx;
		margin: 20rpx auto;
		image{
			width: 80rpx;
			height: 80rpx;
		}
		.flex_r{
			flex: 1;
			margin-left: 15rpx;
		}
		.flex{
			display: flex;
			justify-content: space-between;
			align-items: center;
			font-family: PingFang SC, PingFang SC;
			.t1{
				font-weight: bold;
				font-size: 32rpx;
				color: #000000;
			}
			.t2{
				font-family:'DINB';
				font-size: 40rpx;
				color: #000000;
			}
			.t3{
				font-weight: 500;
				font-size: 28rpx;
				color: #979797;
			}
			.t4{
				font-weight: 500;
				font-size: 24rpx;
				color: #CE7034;
			}
			
		}
	}
}
</style>




